/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.pai.ws;

import interfejs.PacjentService;
import java.util.Date;
import java.util.List;
import java.util.Set;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import klasy.Choroba;
import klasy.Pacjent;
import klasy.PacjentServiceImpl;

/**
 * @author Grzegorz
 */
@WebService(serviceName = "OutWebServices")
public class OutWebServices {

    PacjentService pacjentService;

    public OutWebServices() {
        pacjentService = new PacjentServiceImpl();
    }

    @WebMethod(operationName = "getNewPatients")
    public List<Pacjent> getNewPatients() {
        return pacjentService.getNewPatients();
    }
    
    @WebMethod(operationName = "getPatientIlnesses")
    public Set<Choroba> getPatientIlnesses(@WebParam(name = "id") int id){
        return pacjentService.getPatientsIllnesses(id);
    }
}
